package com.example.tsproject.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName answers
 */
@TableName(value ="answers")
@Data
public class Answers implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "stuNum")
    private String stunum;

    /**
     * 
     */
    @TableField(value = "assignment_id")
    private Integer assignmentId;

    /**
     * 
     */
    @TableField(value = "assignment_question_id")
    private Integer assignmentQuestionId;

    /**
     * 
     */
    @TableField(value = "answer_content")
    private String answerContent;

    /**
     * 
     */
    @TableField(value = "trueOrfalse")
    private Object trueorfalse;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Answers other = (Answers) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStunum() == null ? other.getStunum() == null : this.getStunum().equals(other.getStunum()))
            && (this.getAssignmentId() == null ? other.getAssignmentId() == null : this.getAssignmentId().equals(other.getAssignmentId()))
            && (this.getAssignmentQuestionId() == null ? other.getAssignmentQuestionId() == null : this.getAssignmentQuestionId().equals(other.getAssignmentQuestionId()))
            && (this.getAnswerContent() == null ? other.getAnswerContent() == null : this.getAnswerContent().equals(other.getAnswerContent()))
            && (this.getTrueorfalse() == null ? other.getTrueorfalse() == null : this.getTrueorfalse().equals(other.getTrueorfalse()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStunum() == null) ? 0 : getStunum().hashCode());
        result = prime * result + ((getAssignmentId() == null) ? 0 : getAssignmentId().hashCode());
        result = prime * result + ((getAssignmentQuestionId() == null) ? 0 : getAssignmentQuestionId().hashCode());
        result = prime * result + ((getAnswerContent() == null) ? 0 : getAnswerContent().hashCode());
        result = prime * result + ((getTrueorfalse() == null) ? 0 : getTrueorfalse().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", stunum=").append(stunum);
        sb.append(", assignmentId=").append(assignmentId);
        sb.append(", assignmentQuestionId=").append(assignmentQuestionId);
        sb.append(", answerContent=").append(answerContent);
        sb.append(", trueorfalse=").append(trueorfalse);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}